package cn.cvs.compute.Factory;

import cn.cvs.compute.*;

public class ComputeFactory {
    public static ComputeFactoryInterface count(String c){
        switch (c){
            case "+":
               return new ComputeAddCactory();
            case "-":
               return new ComputeSubtractFactory();
            case "*":
               return new ComputeMultiplyFactory();
            case "/":
               return new ComputeExceptFcatory();
            default:
                throw new RuntimeException("无效数据类型："+c);
        }

    }
}
